package zli.proxy.general;

/**
 * @Desc
 * @Author Zerlinda
 * @Date 2022/5/10 16:44
 * @Version 1.0
 */
public class Proxy implements ISubject {
    private ISubject subject;

    public  Proxy(ISubject subject) {
        this.subject = subject;
    }

    @Override
    public void request() {
        before();
        subject.request();
        after();
    }

    public void before() {
        System.out.println("before request....");
    }

    public void after() {
        System.out.println("after request....");
    }
}
